#export CROSS_COMPILE=arm-linux-
export CROSS_COMPILE=

#LOG_DIR= ..

top_srcdir= $(shell /bin/pwd)
HOST_DIR= $(top_srcdir)/Host/
ifdef LOG_DIR
LOG_DIR= $(top_srcdir)/Log/ZLOG/
endif
RPC_DIR= $(top_srcdir)/Rpc

# We export this Var, for further Makefile
export top_srcdir

# Define finally execute file here
export EXECUTE_FILE= pmc_host

all:
ifdef LOG_DIR
	make -j2 -C $(LOG_DIR)
endif
	make -j2 -C	$(RPC_DIR)
	make -j2 -C $(HOST_DIR)
	cp $(HOST_DIR)Bin/$(EXECUTE_FILE)  .
 	
clean:
ifdef LOG_DIR
	make -j2 -C $(LOG_DIR) distclean
endif
	make -j2 -C $(RPC_DIR) clean
	make -j2 -C $(HOST_DIR) clean
	@rm -f $(top_srcdir)/$(EXECUTE_FILE)	
	tree > Pmctree

cleanall: clean
